
#include <iostream>
#include <map>
#include <boost/shared_ptr.hpp>
#include <string>
#include <iostream>
#include <string>
#include <sstream>

class Page;
typedef boost::shared_ptr<Page> smartPage;
typedef std::map<std::string, smartPage> SmartPageMap;


class Page
{
public:
	void reset();
	std::string getResponse()
	{
		return echo.str();
	}
	virtual void visit()=0;
	std::string getValue(std::string const& value);
	std::stringstream echo;
private:
};


class webserver
{
public:
	webserver(int port, bool ssl = false);
	~webserver();
	void add(std::string const& url, smartPage const& page);
	static SmartPageMap pageMap;

private:
};



